import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'

import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon'
import eleIcons from '@/components/EleIcon'

import '@/assets/styles/index.scss'

import i18n from './locales'

import Cookies from 'js-cookie'

import './permission'

import './utils/rem.js'

const app = createApp(App)

app.use(router)
app.use(store)
app.use(ElementPlus, {
  size: Cookies.get('size') || 'default'
})
app.use(eleIcons)
app.use(i18n)

app.component('svg-icon', SvgIcon)

app.mount('#app')

// console.log(app.version, 'Vue version')
// console.log(app.config, 'app.config')
